package com.gobang.gobang;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class RoomInfo {
    private final String roomId;
    private final StringProperty roomName;
    private final StringProperty player1Name;
    private final StringProperty player2Name;
    private final StringProperty status;
    
    public RoomInfo(String roomId, String roomName, String player1Name, String player2Name, String status) {
        this.roomId = roomId;
        this.roomName = new SimpleStringProperty(roomName);
        this.player1Name = new SimpleStringProperty(player1Name);
        this.player2Name = new SimpleStringProperty(player2Name);
        this.status = new SimpleStringProperty(status);
    }
    
    public String getRoomId() { return roomId; }
    public String getRoomName() { return roomName.get(); }
    public String getPlayer1Name() { return player1Name.get(); }
    public String getPlayer2Name() { return player2Name.get(); }
    public String getStatus() { return status.get(); }
    
    public boolean isFull() {
        return player2Name.get() != null && !player2Name.get().isEmpty();
    }
    
    public boolean isGameStarted() {
        return "游戏中".equals(status.get());
    }
} 